
#if(page.totalPage > 1)
<div class="card mb-1">
	<div class="card-body page-body">
		<div class="row align-items-center">
			<div class="col-5"></div>
			<div class="col align-self-center text-end">
				<div class="float-end" style="height: 26px;">#@paginate(page.pageNumber, page.totalPage, "")</div>
			</div>
		</div>
	</div>
</div>
#end

<table class="table table-hover table-bordered bg-white">
	<thead>
		<tr class="table-header">
			<th>商品名称</th>
			<th>规格</th>
			<th>单位</th>
			<th>关联单据</th>
			<th>出入库</th>
			<th>变更数量</th>
			<th>剩余库存</th>
			<th>时间</th>
		</tr>
	</thead>
	<tbody class="table-row" id="stockInfo-list">
		#for (x : page.getList())
		#set(goodsInfo = x.goodsInfo)
		<tr data-id="#(goodsInfo.id)" id="stockInfo-data-#(goodsInfo.id)" #if(goodsInfo.data_status == DataStatusEnum.disable.value) class="disable-order"  #end>
			
			<td><span class="fw-bold text-secondary">#(goodsInfo.name??)</span></td>
			<td>#(x.specs??)</td>
			<td>#(x.unit.name??)</td>
			<td>#(x.order_code)</td>
			<td>
			#if(x.io_type == StockIoTypeEnum.in.value)  
			<span class="badge bg-success">入库</span>
			#elseif(x.io_type == StockIoTypeEnum.out.value) 
			<span class="badge bg-warning">出库</span>
			#elseif(x.io_type == StockIoTypeEnum.adjust.value) 
			<span class="badge bg-info">调整</span>
			#end
			</td>
			<td><span class="fw-bold text-danger">#number(x.change_number, "#.####")</span> </td>
			<td><span class="text-secondary">#number(x.remain_number, "#.####")</span> </td>
			<td>#date(x.created_at, "yyyy-MM-dd HH:mm:ss")</td>
		</tr>
		#end

	</tbody>
</table>